Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Create  a  New  Outlook  Distribution  List  Based  On  the  Membership  of  an  Active  Directory  Group  

 Content of Create a New Outlook Distribution List Based On the Membership of an Active Directory Group.vbs
MD5 Hash: 776E12BBBE204F1BD93996F20E62E7CF
On Error Resume Next

Const olDistributionListItem = 7

Set objOutlook = CreateObject("Outlook.Application")
Set objList = objOutlook.CreateItem(olDistributionListItem )

objList.DLName = "Test Group"
objList.Save

Set objGroup = GetObject("LDAP://CN=Finance Users,OU=Finance,,DC=fabrikam,DC=com")

For Each strUser in objGroup.Member
Set objUser = GetObject("LDAP://" & strUser)
strUserName = objUser.displayName

Set objRecipient = objOutlook.Session.CreateRecipient(strUserName)
objRecipient.Resolve
objList.AddMember objRecipient
Next



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a